package org.bot.plugin.data.event;

import org.bot.api.event.DataStorage;
import org.bot.api.event.EventName;
import org.bot.api.event.Events;
import org.bot.api.flow.FlowNode;
import org.springframework.stereotype.Component;

/**
 * @author 沧月
 * @create 0028 2023/9/28 17:42
 * @description <输出指定数据到控制台>
 */

@Component
@EventName("输出打印到控制台")
public class DataPrintConsole implements Events {
    @Override
    public Object exec(FlowNode node, DataStorage data) {
        System.out.println(String.format("节点【%s】输出值：%s ", node.getName(), data.get(node.getDataIndex())));
        return null;
    }
}
